package com.hspedu.printstream;

import java.io.IOException;
import java.io.PrintStream;

/**
 * @author 谷其昊
 * @version 1.0
 * @date 2022/2/25
 * @time 16:33
 */
public class PrintStream_ {
    public static void main(String[] args) throws IOException {
        PrintStream out = System.out;

        out.println("hello,john");

        out.write("韩顺平".getBytes());

        System.setOut(new PrintStream("D:\\BaiduNetdiskDownload\\韩顺平2021基础学Java\\temp\\note2.txt"));
        System.out.println("韩顺平教育");

        if (out != null){
            out.close();
        }
    }
}
